﻿using Newtonsoft.Json;
using ShopeeSdk.Response.Shopee.Item;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ShopeeSdk.Request.Shopee.Item
{
    public class AddTierVariationRequest : ShopeeRequest<AddTierVariationResponse>
    {
        public override string RequestUrlEndPath => "item/tier_var/add";

        [JsonProperty("item_id")]
        public int ItemId { get; set; }

        [JsonProperty("variation")]
        public List<Variation> Variations { get; set; } = new List<Variation>();

        public class Variation
        {
            [JsonProperty("tier_index")]
            public List<int> TierIndex { get; set; } = new List<int>();

            [JsonProperty("stock")]
            public int Stock { get; set; }

            [JsonProperty("price")]
            public float Price { get; set; }

            [JsonProperty("variation_sku")]
            public string VariationSku { get; set; }
        }
    }
}
